package com.trump.baiduim;

import com.trump.baiduim.netty.server.WebsocketNettyServer;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

@SpringBootApplication
@MapperScan("com.trump.baiduim.dao")
public class BaiduImApplication implements CommandLineRunner {

    @Autowired
    private WebsocketNettyServer websocketNettyServer;
    
    public static void main(String[] args) {
        SpringApplication.run(BaiduImApplication.class, args);
    }

    @Override
    public void run(String... args) throws Exception {
        websocketNettyServer.run();
    }
}
